const mongoose = require("mongoose");
Schema = mongoose.Schema;
const articleSchema = new Schema({
  title: {
    type: String
  },
  //  多个关联
  categories: [
    {
      type: mongoose.SchemaTypes.ObjectId,
      ref: "category"
    }
  ],
  body: {
    type: String
  }
});

module.exports = mongoose.model("Article", articleSchema);
